From 820de0f13b8921a64bec435024dc0778b0eb1251 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 16 Apr 2013 18:20:00 -0700 Subject: [PATCH] Set up the profiler in CLI mode. Change-Id: I7f36786573870b66b4f1e93c2fc2e444f1ae1252 --- maintenance/doMaintenance.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index 15b00167d2..210c5a2663 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -60,10 +60,15 @@ if ( isset( $_SERVER['MW_COMPILED'] ) ) { # Get the MWInit class require_once( "$IP/includes/Init.php" ); require_once( "$IP/includes/AutoLoader.php" ); + # Stub the profiler + require_once( "$IP/includes/profiler/Profiler.php" ); } -# Stub the profiler -require_once( MWInit::compiledPath( 'includes/profiler/Profiler.php' ) ); +# Start the profiler +$wgProfiler = array(); +if ( file_exists( "$IP/StartProfiler.php" ) ) { + require( "$IP/StartProfiler.php" ); +} // Some other requires if ( !defined( 'MW_COMPILED' ) ) { -- 2.20.1